﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pesquisarCursoNome.aspx.cs" Inherits="LI4.pesquisarCursoNome" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">



<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=abcdefg&sensor=true_or_false"
            type="text/javascript"></script>
<script>
    var geocoder;
    var address;
    var marker;

    function initialize() {
    

        try{
          if (GBrowserIsCompatible()) {
            map = new GMap2(document.getElementById("map_canvas"));

            
            var lat = parseFloat(document.getElementById("click_lat").value);
            var lng = parseFloat(document.getElementById("click_long").value);
            var center = new GLatLng(lat, lng);
            map.setCenter(center, 13);
            marker = new GMarker(center, {draggable: false});
            map.addOverlay(marker);
            map.setUIToDefault();
            
            
          } 
          /*GEvent.addListener(map,"click", function(overlay, latlng) {     
          if (latlng) { 
            document.getElementById("click_lat").value = latlng.y;
            document.getElementById("click_long").value = latlng.x;
            marker.setLatLng(latlng);
            map.addOverlay(marker);
          }
            }); */
          
             
           /*GEvent.addListener(marker, "dragstart", function() {
          map.closeInfoWindow();
          });*/
          

       /* GEvent.addListener(marker, "dragend", function() {
          marker.openInfoWindowHtml("Just bouncing afloat...");
          document.getElementById("click_lat").value = marker.getLatLng().y;
            document.getElementById("click_float").value = marker.getLatLng().x;
           });*/
       }catch(Error){
        
       }    

    }


    </script>

    <title>Untitled Page</title>
    <style type="text/css">
        #form1
        {
            height: 672px;
            width: 800px;
            text-align: left;
        }
        .style1
        {
            text-align: left;
            height: 693px;
            width: 327px;
        }
        .style2
        {
            height: 704px;
        }
    </style>
</head>
<body onload="initialize()">
    <form id="form1" runat="server">
    <table style="height: 695px"><tr><td class="style2">
    <div class="style1">
    
        Pesquisar Cursos por Nome<br />
        <br />
        <br />
        Procura:
        <asp:TextBox ID="TextBox1" runat="server" style="margin-left: 17px" 
            Width="138px"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click1" 
            style="margin-left: 19px" Text="Ok" />
        <br />
        <br />
        <asp:ListBox ID="ListBox1" runat="server" Height="96px" 
            style="margin-left: 45px" Width="223px" 
            onselectedindexchanged="ListBox1_SelectedIndexChanged"></asp:ListBox>
        <br />
    
        <br />
        <asp:Button ID="Button2" runat="server" Height="18px" onclick="Button2_Click" 
            style="margin-left: 106px" Text="Ver informações" Width="107px" />
        <br />
        <br />
        &nbsp;Nome: <asp:TextBox ID="cursoTB" runat="server" ReadOnly="True" 
            style="margin-left: 61px"></asp:TextBox>
        <br />
        &nbsp;Área:&nbsp;
        <asp:TextBox ID="areaTB" runat="server" ReadOnly="True" 
            style="margin-left: 65px"></asp:TextBox>
        <br />
        &nbsp;Vagas: <asp:TextBox ID="vagasTB" runat="server" ReadOnly="True" 
            style="margin-left: 61px"></asp:TextBox>
        <br />
        &nbsp;Inscritos:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="vagasdTB" runat="server" ReadOnly="True" 
            style="margin-left: 9px"></asp:TextBox>
        <br />
        &nbsp;Renumeração:<asp:TextBox ID="renumeTB" runat="server" ReadOnly="True" 
            style="margin-left: 19px"></asp:TextBox>
        <br />
        &nbsp;Distrito: <asp:TextBox ID="distritoTB" runat="server" ReadOnly="True" 
            style="margin-left: 55px"></asp:TextBox>
        <br />
        &nbsp;Localidade: <asp:TextBox ID="localidadeTB" runat="server" ReadOnly="True" 
            style="margin-left: 30px"></asp:TextBox>
        <br />
        &nbsp;Morada:&nbsp;
        <asp:TextBox ID="moradaTB" runat="server" ReadOnly="True" 
            style="margin-left: 44px"></asp:TextBox>
        <br />
        <br />
        &nbsp;Descrição:
        <br />
        <asp:TextBox ID="descricaoTB" runat="server" Height="100px" ReadOnly="True" 
            style="margin-left: 29px" TextMode="MultiLine" Width="187px"></asp:TextBox>
    
        <br />
        <asp:Button ID="inscreverTB" runat="server" onclick="inscreverTB_Click" 
            style="margin-left: 138px; margin-top: 18px" Text="Inscrever" />
        <br />
    
       </div>
       
       </td>
       <td style="vertical-align: top" class="style2"> 
        
        <div id="map_canvas" style="height: 443px; width: 477px;" runat="server"> </div>
            
            <input type="hidden"   id="click_lat"	onclick="this.blur()" runat="server"/>&nbsp;

	        <input type="hidden"  id="click_long"	onclick="this.blur()" runat="server"/>&nbsp;
       
        </td>
       </tr></table>
    </form>
</body>
</html>